package com.muqi.app.project.utils;

import android.text.TextUtils;

import com.google.gson.Gson;
import com.muqi.app.modle.bean.QrCodeBean;

public class QrCodeUtils {
	
	public static String buildQrCode(String action,String act_id,String act_info,String act_ext) {
		if(TextUtils.isEmpty(action)){
			return "";
		}
		if(TextUtils.isEmpty(act_id)){
			return "";
		}
		QrCodeBean qrBean = null;
		qrBean = new QrCodeBean();
		qrBean.setQrAction(action);
		qrBean.setQrActionName(act_id);
		qrBean.setQrActionInfo(act_info);
		qrBean.setQrActExt(act_ext);
		Gson gson = null;
		gson = new Gson();
		String qrCode = gson.toJson(qrBean);// Json编码
		return qrCode;
	}
}
